<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/jsp/taglib.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<%@ include file="/jsp/head.jsp"%>
<%@ include file="/jsp/jslib.jsp"%>
<script type="text/javascript">
PAGE_CONFIG = {
	'MENU_INDEX' : 2,'LI_INDEX' : 5
};
</script>
</head>

<body>
<%@ include file="/jsp/banner.jsp"%>
<div class="am-cf admin-main">
    <%@ include file="/jsp/menu.jsp"%>
	
	<!-- content start -->
	<div class="admin-content">
		<div class="admin-content-body">
		
		<!-- ***** 分离出去 动态加载 start ***** -->
		
		<div class="admin-content-body">
		    <div class="am-cf am-padding am-padding-bottom-0">
		        <div class="am-fl am-cf">
		            <strong class="am-text-primary am-text-lg"> 编辑客户联系人 </strong>
		        </div>
		    </div>
		    
		    <hr>
		    
            <form action="${ctx}/contact/insertorupdate" method="post" class="am-form">
            	<div class="am-g am-margin-top" hidden>
                    <div class="am-u-sm-8 am-u-md-4">
                        <input id="customerId" name="customerId" value="${param.customerId}" type="text" class="am-input-sm">
                    </div>
                </div>
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right"> 姓名 </div>
                    <div class="am-u-sm-8 am-u-md-4">
                        <input id="customerName" name="customerName" value="${param.customerName}" type="text" class="am-input-sm" required>
                    </div>
                    <div class="am-hide-sm-only am-u-md-6"> *必填 </div>
                </div>
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right"> 职称 </div>
                    <div class="am-u-sm-8 am-u-md-4">
                        <input id="title" name="title" value="${param.customerTitle}" type="text" class="am-input-sm" required>
                    </div>
                    <div class="am-hide-sm-only am-u-md-6"> *必填 </div>
                </div>
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right"> 联系电话 </div>
                    <div class="am-u-sm-8 am-u-md-4">
                        <input id="customerMobile" name="customerMobile" value="${param.customerMobile}" type="text" class="am-input-sm" required>
                    </div>
                    <div class="am-hide-sm-only am-u-md-6"> *必填 </div>
                </div>
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right"> 邮箱 </div>
                    <div class="am-u-sm-8 am-u-md-4">
                        <input id="customerEmail" name="customerEmail" value="${param.customerEmail}" type="text" class="am-input-sm" required>
                    </div>
                    <div class="am-hide-sm-only am-u-md-6"> *必填 </div>
                </div>
                <div class="am-g am-margin-top">
                    <div class="am-u-sm-4 am-u-md-2 am-text-right"> 所属公司 </div>
                    <div class="am-u-sm-8 am-u-md-4">
                        <select id="customerCompanyId" name="customerCompanyId" required>
	           				<option value="">请选择</option>
                            <c:forEach items="${sessionScope.fgCustomerCompanyList}" var = "company" >
		           				<option value="${company.customerCompanyId}"
			           				<c:if test="${company.customerCompanyId == param.customerCompanyId}">selected</c:if>
			           				>${company.customerCompanyName}
			           			</option>
		           			</c:forEach>
                        </select>
                    </div>
                    <div class="am-hide-sm-only am-u-md-6"> *必填 </div>
                </div>
                <div class="am-margin">
			        <button type="submit" class="am-btn am-btn-primary am-btn-sm am-margin-sm"> 保 存 </button>
			        <button type="button" class="am-btn am-btn-primary am-btn-sm am-margin-sm" onclick="javascript:window.location.href='${ctx}/customer/all'"> 返 回 </button>
			    </div>
            </form>
		</div>
			
		<!-- ***** 分离出去 动态加载 end ***** -->
	</div>
	<!-- content end -->
</div>
</div>
</body>
</html>